package com.platform.hjt.erp.model;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ErpStorageFlowDetailId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class ErpStorageFlowDetailId implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -1596820906848166632L;
	private String storageFlowId;
	private String erpGoodInfoId;

	// Constructors

	/** default constructor */
	public ErpStorageFlowDetailId() {
	}

	/** full constructor */
	public ErpStorageFlowDetailId(String storageFlowId, String erpGoodInfoId) {
		this.storageFlowId = storageFlowId;
		this.erpGoodInfoId = erpGoodInfoId;
	}

	// Property accessors

	@Column(name = "storage_flow_id", nullable = false, length = 32)
	public String getStorageFlowId() {
		return this.storageFlowId;
	}

	public void setStorageFlowId(String storageFlowId) {
		this.storageFlowId = storageFlowId;
	}

	@Column(name = "erp_good_info_id", nullable = false, length = 32)
	public String getErpGoodInfoId() {
		return this.erpGoodInfoId;
	}

	public void setErpGoodInfoId(String erpGoodInfoId) {
		this.erpGoodInfoId = erpGoodInfoId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ErpStorageFlowDetailId))
			return false;
		ErpStorageFlowDetailId castOther = (ErpStorageFlowDetailId) other;

		return ((this.getStorageFlowId() == castOther.getStorageFlowId()) || (this
				.getStorageFlowId() != null
				&& castOther.getStorageFlowId() != null && this
				.getStorageFlowId().equals(castOther.getStorageFlowId())))
				&& ((this.getErpGoodInfoId() == castOther.getErpGoodInfoId()) || (this
						.getErpGoodInfoId() != null
						&& castOther.getErpGoodInfoId() != null && this
						.getErpGoodInfoId()
						.equals(castOther.getErpGoodInfoId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getStorageFlowId() == null ? 0 : this.getStorageFlowId()
						.hashCode());
		result = 37
				* result
				+ (getErpGoodInfoId() == null ? 0 : this.getErpGoodInfoId()
						.hashCode());
		return result;
	}

}